import Vue from 'vue'
import VueRouter from 'vue-router'
import HomeView from '../views/HomeView.vue'

Vue.use(VueRouter)

const routes = [
  {
    path: '/',
    redirect:'/home'
  }
  ,
  {
    path: '/about',
    name: 'about',
    component: () => import(/* webpackChunkName: "about" */ '../views/AboutView.vue')
  }
  ,
  {
    path: '/home', // 唯一值
    name: 'home', // 唯一值
    meta:{
      isShowTabbar:true
    },
    //  提高项目运行性能
    component: () => import(/* webpackChunkName: "home" */ '../views/home/index.vue')
  }
  ,
  {
    path: '/home/searchaddress', // 唯一值
    name: 'SearchAddress', // 唯一值
    meta:{
      isShowTabbar:false
    },
    //  提高项目运行性能
    component: () => import(/* webpackChunkName: "home" */ '../views/home/addressSearch/index.vue')
  }
  ,
  {
    path: '/topic', // 唯一值
    name: 'topic', // 唯一值
    meta:{
      isShowTabbar:true
    },
    //  提高项目运行性能
    component: () => import(/* webpackChunkName: "topic" */ '../views/topic/index.vue')
  }
  ,
  {
    path: '/category', // 唯一值
    name: 'category', // 唯一值
    meta:{
      isShowTabbar:true
    },
    //  提高项目运行性能
    component: () => import(/* webpackChunkName: "category" */ '../views/category/index.vue')
  }
  ,
  {
    path: '/cart', // 唯一值
    name: 'cart', // 唯一值
    meta:{
      isShowTabbar:true
    },
    //  提高项目运行性能
    component: () => import(/* webpackChunkName: "cart" */ '../views/cart/index.vue')
  }
  ,
  {
    path: '/my', // 唯一值
    name: 'my', // 唯一值
    meta:{
      isShowTabbar:true
    },
    //  提高项目运行性能
    component: () => import(/* webpackChunkName: "my" */ '../views/my/index.vue')
  }
]

const router = new VueRouter({
  routes
})

export default router
